package com.itheima.controller;

import com.itheima.pojo.Person;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <dl>
 * <dd>描述: ~节点业务逻辑实现</dd>
 * <dd>创建时间：  12:00 2020/8/16</dd>
 * <dd>创建人： zz</dd>
 * <dt>版本历史: </dt>
 * <pre>
 * Date         Author      Version     Description
 * ------------------------------------------------------------------
 * 2020/8/16      guodong       1.0        1.0 Version
 * </pre>
 * </dl>
 */
@RestController //组合注解 @Controller + @ResponseBody
public class HelloController {

    @Value("${personName}")
    private String name;

    @Autowired
    private Person person;


    @RequestMapping("hello")
    public String hello(){
        return "hello spring boot 01 " + name;
    }

    @RequestMapping("getPerson")
    public Person getPerson() {
        return person;
    }
}
